Skip to content

feat(feedback): add GetFeedback and CreateFeedback service - #339

Merged
ozline merged 11 commits into
west2-online:mainfrom
wastefi:feedback-api
Oct 6, 2025
Merged

feat(feedback): add GetFeedback and CreateFeedback service#339
ozline merged 11 commits into
west2-online:mainfrom
wastefi:feedback-api

Conversation

@wastefi

@wastefi wastefi commented Oct 4, 2025

Copy link
Copy Markdown
Contributor

自查 PR 结构

  • PR 标题符合这个格式: <type>(optional scope): <description>

  • 此 PR 标题的描述以用户为导向,足够清晰,其他人可以理解。

  • 我已经对所有 commit 提供了签名(GPG 密钥签名、SSH 密钥签名)

  • 这个 PR 属于强制变更/破坏性更改

如果是,请在 PR 标题中添加 BREAKING CHANGE 前缀,并在 PR 描述中详细说明。

这个 PR 的类型是什么?

feat

这个 PR 做了什么 / 我们为什么需要这个 PR?

目前的福uu受众面相对较大,经常出现用户通过app内的飞书文档反馈bug。然而,飞书文档的反馈无法精准定位用户问题所在,简单的反馈表单无法满足回查所在,因此我们想要有一个内置的反馈系统。
这个pr目前提供了最简单的CreateFeedback与GetFeedback的后端接口。同时,该功能与当前的模块定位都不太符合,因此还新建了一个oa模块。

(可选)这个 PR 解决了哪个/些 issue?

对 Reviewer 预留的一些提醒

  • 目前只提供了创建、查询的接口,并没有修改与删除(我认为这部分不必要),如后续有需求应当补充。
  • 工单编号的生成并没有体现在接口中,如传入空编号或非法编号(如0, -1)将报错。目前的设计想法是将这个步骤放到前端,后端只负责接收数据;如要将生成编号的功能也放入后端,后续应当补充。
  • 数据表中仅包含学生信息、设备信息等基本内容,这些信息应该是只读的;但是后续可能还需要加入一些信息,例如工单处理人、处理时间、处理结果是否满意等。如新增这些信息,数据修改的接口也是必须的,应当后续补充。
  • 新增代码中单元测试覆盖率较低,后续应该会再次补充。

关联需求文档:https://west2-online.feishu.cn/wiki/DvI5w9t2iiOyggktHnBc3HcbnYb

@wastefi
wastefi requested review from a team, jiuxia211, mutezebra and ozline as code owners October 4, 2025 15:34
Comment thread cmd/api/kitex_info.yaml Outdated
Comment thread cmd/oa/main.go Outdated
Comment thread pkg/db/model/oa.go Outdated
Comment thread internal/oa/service/feedback_service.go Outdated
Comment thread internal/oa/service/feedback_service.go Outdated

@ozline ozline left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

来一轮修改

@ozline

ozline commented Oct 4, 2025

Copy link
Copy Markdown
Member

同时记得解决一下 pr 的合入冲突,可以了解一下 git 的冲突解决方式

@wastefi
wastefi requested a review from ozline October 4, 2025 17:50
Comment thread api/rpc/oa.go Outdated
Comment thread cmd/oa/script/bootstrap.sh Outdated
Comment thread internal/oa/service/feedback_service.go
@codecov

codecov Bot commented Oct 4, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 7.89089% with 1891 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
kitex_gen/oa/k-oa.go 0.00% 1409 Missing ⚠️
kitex_gen/oa/oa.go 0.00% 211 Missing ⚠️
internal/oa/handler.go 0.00% 67 Missing ⚠️
kitex_gen/oa/oaservice/oaservice.go 34.93% 53 Missing and 1 partial ⚠️
cmd/oa/main.go 0.00% 37 Missing ⚠️
api/rpc/oa.go 0.00% 27 Missing ⚠️
kitex_gen/oa/oaservice/client.go 0.00% 24 Missing ⚠️
api/handler/api/feedback_service.go 73.91% 12 Missing ⚠️
kitex_gen/oa/oaservice/server.go 0.00% 12 Missing ⚠️
pkg/utils/json.go 50.00% 9 Missing and 3 partials ⚠️
... and 6 more
@@           Coverage Diff            @@
##            main    #339      +/-   ##
========================================
+ Coverage   5.24%   5.41%   +0.17%     
========================================
  Files        255     269      +14     
  Lines      31091   33144    +2053     
========================================
+ Hits        1630    1795     +165     
- Misses     29362   31245    +1883     
- Partials      99     104       +5     
Flag Coverage Δ
unittest 5.41% <7.89%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/oa/service/service.go 100.00% <100.00%> (ø)
pkg/db/oa/create_feedback.go 100.00% <100.00%> (ø)
pkg/db/oa/get_feedback.go 100.00% <100.00%> (ø)
pkg/db/oa/oa.go 100.00% <100.00%> (ø)
api/rpc/init.go 0.00% <0.00%> (ø)
pkg/db/db.go 0.00% <0.00%> (ø)
pkg/base/client/rpc.go 0.00% <0.00%> (ø)
api/router/api/api.go 0.00% <0.00%> (ø)
internal/oa/service/feedback_service.go 88.40% <88.40%> (ø)
api/router/api/middleware.go 0.00% <0.00%> (ø)
... and 10 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread pkg/utils/json.go Outdated

@ozline ozline left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

继续修改

@ozline

ozline commented Oct 4, 2025

Copy link
Copy Markdown
Member

CI 报错了,修一下 CI,具体可以点进每个 CI 查询报错原因

Signed-off-by: wastefi <wastefi69@gmail.com>
@wastefi
wastefi requested a review from ozline October 5, 2025 08:00
@ozline
ozline enabled auto-merge (squash) October 6, 2025 03:45
@ozline
ozline merged commit 17289de into west2-online:main Oct 6, 2025
5 of 6 checks passed
@jiuxia211

Copy link
Copy Markdown
Contributor

部署的action也要做对应的修改

@jiuxia211

Copy link
Copy Markdown
Contributor

记得具体建表需要去服务器内部的服务器操作

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants